import { menu } from '@/config/menu'
import routeFilter from './filter'
import store from '@/store'
// import Main from '../components/main'

let { route } = routeFilter(menu)
// console.log(route);
store.dispatch('setMenuList', JSON.parse(JSON.stringify(menu)))
export default [
  ...route,
  {
    path: '/401',
    name: 'error_401',
    meta: {
      hideInMenu: true
    },
    component: () => import('@/view/error-page/401.vue')
  },
  {
    path: '/500',
    name: 'error_500',
    meta: {
      hideInMenu: true
    },
    component: () => import('@/view/error-page/500.vue')
  },
  {
    path: '*',
    name: 'error_404',
    meta: {
      hideInMenu: true
    },
    component: () => import('@/view/error-page/404.vue')
  }
]
